package com.itheima.sh.m_interface_demo;

import java.util.ArrayList;

//班级管理类
public class ClassManger {
    private ArrayList<Student> students = new ArrayList<>();
    private StudentOperator studentOperator = new StudentOperatorImpl2();

    public ClassManger() {
        students.add(new Student("迪丽热巴", '女', 99));
        students.add(new Student("古力娜扎", '女', 100));
        students.add(new Student("马尔扎哈", '男', 80));
        students.add(new Student("马拉嘎巴", '男', 60));
    }

    //打印全班全部学生的信息
    public void printInfo() {
        studentOperator.printAllInfo(students);
    }


    //打印全班全部学生的平均分
    public void printScore() {
        studentOperator.printAvgScore(students);

    }
}
